from pprint import pprint

import yaml
class ReadYaml():
    def __init__(self,y_path):
        self.y_path=y_path
    def read_yaml(self):
        with open(self.y_path,encoding='utf-8') as f: #'../config/page_element.yml'
            return yaml.safe_load(f)

if __name__ == '__main__':
    # data_eles=ReadYaml('../config/xnapp.yml').read_yaml()['普通账户登录页']
    #data_eles=ReadYaml('../config/devices.yml').read_yaml()['sanxing_jdz']
    data_eles=ReadYaml('../config/jdzapp.yml').read_yaml()['反弹买入模块']
    # data_eles = ReadYaml('../config/bjs_buy.yml').read_yaml()
    pprint(data_eles)

